<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>

<body>

    <div id="app">
        <ul>
            <!-- 遍历对象的时候，item指是是对象value，index为key值 -->
            <li v-for="item,index in person ">{{item}}--{{index}}</li>
        </ul>
        <ul>
            <li v-for="item,index in 10">{{index}}--{{item}}</li>
        </ul>
        <ul>
            <!-- 字符串需要加'' -->
            <li v-for="item,index in 'abcdefg'">{{index}}--{{item}}</li>
        </ul>
    </div>
    <script>
        Vue.config.productionTip = false;
        const vm = new Vue({
            el: '#app',
            data() {
                return {
                    person: {
                        name: '张三',
                        age: 20,
                        hobby: '打球'
                    }
                }
            }
        })
    </script>
</body>

</html>